<template>
  <div class="bgc-default pad-20">
    <div class="bg-color-white">
      <div class="tabs-box mar-t--10">
        <el-tabs v-model="tabActive" @tab-click="doChangeTab">
          <el-tab-pane label="普通订单" name="normal"></el-tab-pane>
          <el-tab-pane label="跨境订单" v-if="crossBorderData.crossBorderBusinessFlag === 1 " name="crossBorder"></el-tab-pane>
        </el-tabs>
      </div>
      <!-- 普通订单 -->
      <normal-order v-if="tabActive == 'normal'"></normal-order>
      <!-- 跨境订单 -->
      <cross-border-order v-if="tabActive == 'crossBorder'"></cross-border-order>
    </div>
  </div>
</template>


<script>
import normalOrder from './components/normal-order'
import crossBorderOrder from './components/cross-border-order'
import {
  getByEnterpriseId
} from '@/api/user/enterprise'
export default {
  components: {
    normalOrder, crossBorderOrder
  },
  data() {
    return {
      tabActive: 'normal',
      crossBorderData: {}
    }
  },
  created() {
    getByEnterpriseId(this.getEnterpriseId()).then(response => {
      this.crossBorderData = response.data
    })
  },
  methods: {
    // tab切换事件
    doChangeTab() {
    }
  }
}
</script>

<style lang="less" scoped>

</style>
